// logs.js
const util = require('../../utils/util.js')

Page({
  data: {
    logs: [],
    age:null,
    name:''
  },
  onLoad(options) {
    console.log(options)
    this.setData({
      name:options.name,
      age:options.age
    })
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(log => {
        return {
          date: util.formatTime(new Date(log)),
          timeStamp: log
        }
      })
    })
  },
  backNavigate() {
    wx.navigateBack({
      url: '/pages/navigate/navigate',
      delta: '1'
    })
  }
})